<!--
	user list !
-->
<h3>{{rootColumnName}}
   <small>{{rootColumnPrompt}}</small>
</h3>
<div  ng-controller="cmsUserManageCtrl" class="panel panel-default">
	<div class="panel-heading">
		<form class="form-inline">
			<div class="form-group">
				<label for="searchInput"></label>
				<input type="text" ng-keyup="dataEvent($event)" ng-model="searchKey" class="form-control" id="searchInput" placeholder="用户名、ID...">
				<label ng-hide="rootSectionId != 0" for="">{{selectboxname_section}} : </label>
				<select ng-hide="rootSectionId != 0" class="custom-css form-control"  ng-model="rootSection" ng-change="dataChange()" ng-options="rootSectionItem.name for rootSectionItem in rootSections" >
				</select>
			</div>
			<button type="button" ng-click="addCmsUserModal()" class="btn btn-labeled btn-success pull-right">
               	<span class="btn-label">
               		<i class="fa fa-plus"></i>
               	</span>添加
			</button>
		</form>
	</div>
	<div class="panel-body " ng-class="loading?'whirl standard':'' " style="border-top: 1px solid #CFDBE2;">
		<table class="table table-striped table-condensed">
			<thead>
				<tr>
					<th><i class="icon-flag"></i> 用户ID</th>
					<th><i class="icon-user"></i> 用户名</th>
					<th><i class="icon-users"></i> 部门</th>
					<th><i class="icon-wrench"></i> 操作</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="userItem in cmsUserList ">
					<td>{{userItem.cmsuserId}}</td>
					<td>{{userItem.name}}</td>
					<td>{{userItem.sectionId | role_section_filter}}</td>
					<td>
						<a tooltip="修改" tooltip-trigger="mouseenter" class="btn btn-xs btn-warning" ng-click="updateCmsUserModal(userItem.cmsuserId,userItem.name)"><i class="icon-pencil"></i></a>
						<a tooltip="删除" tooltip-trigger="mouseenter" class="btn btn-xs btn-danger" ng-click="delCmsUser(userItem.cmsuserId)"><i class="icon-trash"></i></a>
						<a tooltip="给用户配置角色" tooltip-trigger="mouseenter" class="btn btn-xs btn-primary" ng-click="configRoleToCmsUserModal(userItem.cmsuserId,userItem.roles)"><i class="icon-wrench"></i></a>
					</td>
				</tr>
			</tbody>
		</table>
		<p style="display: inline-block; margin:21px 0;height: 30px;line-height: 30px;"> 显示 <strong>{{turnPage.totalItems}}</strong> 条中的 <strong>{{turnPage.itemsPerPage*(turnPage.currentPage-1)+1}}-{{ToNum}}</strong> 条</p>
		<pagination
				class="pull-right pagination-sm"
				first-text="{{turnPage.firstText}}"
				previous-text="{{turnPage.previousText}}"
				next-text="{{turnPage.nextText}}"
				last-text="{{turnPage.lastText}}"
				total-items="turnPage.totalItems"
				ng-model="turnPage.currentPage"
				max-size="turnPage.maxSize"
				num-pages="numPages"
				boundary-links="true"
				ng-change="dataChange()">
		</pagination>
	</div>
</div>